<script setup lang="ts">
import { useRouter } from 'vue-router'
import { Button as AButton } from 'ant-design-vue'

const router = useRouter()

const goBack = () => {
  router.back()
}

const goHome = () => {
  router.push('/profile')
}
</script>

<template>
  <div class="forbidden-container">
    <div class="forbidden-content">
      <div class="error-code">403</div>
      <h1 class="error-title">访问被拒绝</h1>
      <p class="error-desc">抱歉，您没有权限访问该页面</p>
      <div class="action-buttons">
        <a-button type="primary" @click="goBack">返回上页</a-button>
        <a-button @click="goHome">个人中心</a-button>
      </div>
    </div>
  </div>
</template>

<style scoped>
.forbidden-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f7fa;
}

.forbidden-content {
  text-align: center;
  padding: 48px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.error-code {
  font-size: 72px;
  font-weight: bold;
  color: #ff4d4f;
  line-height: 1.2;
  margin-bottom: 24px;
}

.error-title {
  font-size: 24px;
  color: #1f1f1f;
  margin-bottom: 16px;
}

.error-desc {
  font-size: 16px;
  color: #666;
  margin-bottom: 32px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

:deep(.ant-btn) {
  height: 40px;
  padding: 0 24px;
  border-radius: 6px;
  font-size: 16px;
}
</style>
